import { request } from '@/utils/request';

// 查看平台商户信息
export function getProvinceInfo(data) {
  return request(
    {
      url: '/provider/getProviderInfo',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 注销账号
export function logoff(data) {
  return request({
    url: '/logoff',
    method: 'POST',
    data
  });
}

// 修改平台商户密码
export function updateProviderPassword(data) {
  return request({
    url: '/provider/updateProviderPassword',
    method: 'POST',
    data
  });
}

// 修改手机号
export function updateProviderPhone(data) {
  return request({
    url: '/provider/updateProviderPhone',
    method: 'POST',
    data
  });
}

// 修改商户信息 头像 平台商户名称 注册地区
export function updateProviderInfo(data) {
  return request({
    url: '/provider/updateProviderInfo',
    method: 'POST',
    data
  });
}

// banner列表
export function getBannerList(data) {
  return request(
    {
      url: '/banner/getBannerList',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 获取渠道商发布线索数量
export function getProviderPublishClueCount(data) {
  return request(
    {
      url: '/clue/getProviderPublishClueCount',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 获取渠道商线索数量
export function getProviderFreshClueCount(data) {
  return request(
    {
      url: '/clue/getProviderFreshClueCount',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 首页产品接单轮播
export function getProductReceiveClueCarousel(data) {
  return request(
    {
      url: '/clue/getProductReceiveClueCarousel',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 获取贡献值明细
export function getContributionValueDetail(data) {
  return request(
    {
      url: '/contributionValue/getContributionValueDetail',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 贡献值明细列表
export function getContributionValuePage(data) {
  return request(
    {
      url: '/contributionValue/getContributionValuePage',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 获取佣金规则字典
export function getDictList(data) {
  return request(
    {
      url: '/client/dict/getDictList',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 获取APP版本信息
export function getAppLatestVersion(data) {
  return request(
    {
      url: '/appDownload/getAppLatestVersion',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 首页资讯
export function providerCommissiongetProviderCommissionNews() {
  return request(
    {
      url: '/providerCommission/getProviderCommissionNews',
      method: 'POST',
      data: {}
    },
    { loading: false, toast: false }
  );
}

// 获取线索最新跟进记录
export function cluegetLatestClueFollowUp() {
  return request(
    {
      url: '/clue/getLatestClueFollowUp',
      method: 'POST',
      data: {}
    },
    { loading: false, toast: false }
  );
}
